<?php
    require_once( 'includes/common.inc.php' );

    $smarty = new AdvancedSmarty();
    $varArray = array
    (
        'title' => 'Login',
        'description' => 'It\'s free and always will be.',
        'css' => '/css/style.css'
    );
    if ( isset( $_GET['auth'] ) )
    {
        if ( $_GET['auth'] == 'not_logged_in' )
        {
            $varArray['errorMsg'] = 'You are not registered.';
        }
        elseif ( $_GET['auth'] == 'error' )
        {
            $varArray['errorMsg'] = 'Invalid login or password.';
        }
    }
    $smarty->caching = false;
    $smarty->buildLayout( 'login.tpl', $varArray );
?>